package com.jy.adscm.operation.aftersales.bean;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jy.adscm.operation.mscyb.bean.JqbzSettings;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author zyl
 * @since 2019-08-19
 */
public class ShSpaceParts implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 部件名称
     */
    private String partsName;
    @TableField(exist = false)
    private JqbzSettings partsNameName;
    /**
     * 部件条码
     */
    private String partsCode;
    //备件型号
    private String partsType;
    /**
     * 批号
     */
    private String partsBatchCode;
    /**
     * 入库人
     */
    private String creator;
    @TableField(exist = false)
    private String creatorName;
    /**
     * 入库时间
     */
    private Date createTime;
    /**
     * 物料状态(0表示在库存中，1表示已经出库 )
     */
    private Integer state;
    //部装的id
    private  Integer pid;

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public JqbzSettings getPartsNameName() {
        return partsNameName;
    }

    public void setPartsNameName(JqbzSettings partsNameName) {
        this.partsNameName = partsNameName;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPartsName() {
        return partsName;
    }

    public void setPartsName(String partsName) {
        this.partsName = partsName;
    }

    public String getPartsCode() {
        return partsCode;
    }

    public void setPartsCode(String partsCode) {
        this.partsCode = partsCode;
    }

    public String getPartsType() {
        return partsType;
    }

    public void setPartsType(String partsType) {
        this.partsType = partsType;
    }

    public String getPartsBatchCode() {
        return partsBatchCode;
    }

    public void setPartsBatchCode(String partsBatchCode) {
        this.partsBatchCode = partsBatchCode;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    public Date getCreateTime() {
        return createTime;
    }
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "ShSpaceParts{" +
        "id=" + id +
        ", partsName=" + partsName +
        ", partsCode=" + partsCode +
        ", partsType=" + partsType +
        ", partsBatchCode=" + partsBatchCode +
        ", creator=" + creator +
        ", createTime=" + createTime +
        ", state=" + state +
        "}";
    }
}
